package com.example.demo.dao;

import com.example.demo.entity.Chat;
import com.example.demo.mapper.ChatMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class ChatDao {
    @Autowired
    public ChatMapper chatMapper;

    public List<Chat> getChatList(long flowId) {
        return chatMapper.findByFlowId(flowId);
    }

    public Object addChat(Chat chat) {
        return chatMapper.insertChat(chat);
    }
}
